<!DOCTYPE html>
<html lang="zh-CN,en,default">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.0.2">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"wakojam.gitee.io","root":"/","scheme":"Mist","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="鉴于我自身建站经历，在翻阅了各种教程后，终于将这个网站在github pages上搞出来了, 在此, 将详细的过程记录下来，一来防止自己以后忘记, 二来如果有幸可以帮到更多跟我一样的人, 我也是乐见其成的">
<meta property="og:type" content="article">
<meta property="og:title" content="利用GitHub Pages建立自己专属博客以及域名绑定的详细步骤">
<meta property="og:url" content="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/index.html">
<meta property="og:site_name" content="Want笔记档案">
<meta property="og:description" content="鉴于我自身建站经历，在翻阅了各种教程后，终于将这个网站在github pages上搞出来了, 在此, 将详细的过程记录下来，一来防止自己以后忘记, 二来如果有幸可以帮到更多跟我一样的人, 我也是乐见其成的">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaAbZwPNAojNBWY_1382_648.png">
<meta property="og:image" content="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaBS-fDNAtbNBW4_1390_726.png">
<meta property="og:image" content="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaAnbWnNAnjNBWo_1386_632.png">
<meta property="og:image" content="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaAp2LnNAxDNBWU_1381_784.png">
<meta property="og:image" content="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaArin3NAtLNAvI_754_722.png">
<meta property="og:image" content="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaAsSHzNAz3NBWY_1382_829.png">
<meta property="og:image" content="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaAw3K1MzQV3_1399_76.png">
<meta property="og:image" content="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaA_WIDNAtnNBWI_1378_729.png">
<meta property="og:image" content="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaBBpXXNAvPNBpQ_1684_755.png">
<meta property="og:image" content="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaBGAuXNAaXNBOU_1253_421.png">
<meta property="og:image" content="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaByXSrNA2rNBYw_1420_874.png">
<meta property="og:image" content="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaB0NQvNA3TNBXw_1404_884.png">
<meta property="article:published_time" content="2018-12-12T10:53:50.000Z">
<meta property="article:modified_time" content="2020-08-28T01:53:53.812Z">
<meta property="article:author" content="Want.Jocker">
<meta property="article:tag" content="site">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaAbZwPNAojNBWY_1382_648.png">

<link rel="canonical" href="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>利用GitHub Pages建立自己专属博客以及域名绑定的详细步骤 | Want笔记档案</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">Want笔记档案</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

  <a href="https://gitee.com/WakoJam" class="github-corner" title="Follow me on Gitee" aria-label="Follow me on Gitee" rel="noopener" target="_blank"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://wakojam.gitee.io/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="Want.Jocker">
      <meta itemprop="description" content="不积跬步无以至千里">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Want笔记档案">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          利用GitHub Pages建立自己专属博客以及域名绑定的详细步骤
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2018-12-12 18:53:50" itemprop="dateCreated datePublished" datetime="2018-12-12T18:53:50+08:00">2018-12-12</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2020-08-28 09:53:53" itemprop="dateModified" datetime="2020-08-28T09:53:53+08:00">2020-08-28</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/memo/" itemprop="url" rel="index"><span itemprop="name">memo</span></a>
                </span>
            </span>

          
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h3 id="1-登录GitHub官网"><a href="#1-登录GitHub官网" class="headerlink" title="1. 登录GitHub官网"></a>1. 登录<a target="_blank" rel="noopener" href="https://github.com/">GitHub</a>官网</h3><p>　如果已经有账号直接<a target="_blank" rel="noopener" href="https://github.com/login">登录</a>即可，没有的话需要<a target="_blank" rel="noopener" href="https://github.com/join?source=experiment-header-dropdowns-home">注册</a></p>
<h3 id="2-创建仓库"><a href="#2-创建仓库" class="headerlink" title="2. 创建仓库"></a>2. 创建仓库</h3><p><img src="/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaAbZwPNAojNBWY_1382_648.png" alt="Alt text"><br>点击右上角个人头像左侧的<code>+</code>, 在选项中选择<code>New repository</code>到<a target="_blank" rel="noopener" href="https://github.com/new%E6%96%B0%E5%BB%BA%E4%BB%93%E5%BA%93">https://github.com/new新建仓库</a><br><img src="/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaBS-fDNAtbNBW4_1390_726.png" alt="Alt text"></p>
<p><strong>这个新仓库就将是存放你即将拥有的博客的地方</strong></p>
<p><strong>注意</strong>: 仓库名(<strong><em>Repository name</em></strong>)不能随便取，取名的格式应该为“用户名.github.io”，而且”<strong>用户名</strong>“必须与”<strong>Owner的名称</strong>“保持一致. 比如: 我的<code>Owner</code>是<code>WakoJia-Pei</code>, 那么<code>Repository name</code>就必须是<code>WakoJia-Pei.github.io</code></p>
<h3 id="3-进入GitHub线上仓库设置"><a href="#3-进入GitHub线上仓库设置" class="headerlink" title="3. 进入GitHub线上仓库设置"></a>3. 进入GitHub线上仓库设置</h3><p>建完仓库后，在当前页面上边选择Settings，进入设置页面，在这里生成github pages<br><img src="/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaAnbWnNAnjNBWo_1386_632.png" alt="Alt text"></p>
<h3 id="4-自动生成博客"><a href="#4-自动生成博客" class="headerlink" title="4. 自动生成博客"></a>4. 自动生成博客</h3><p>进入Setting后, 在最上边的位置Repository name默认即可<br><img src="/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaAp2LnNAxDNBWU_1381_784.png" alt="Alt text"></p>
<p>将网页向下拖, 找到 <strong>GitHub Pages</strong> , 按图照做即可<br><img src="/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaArin3NAtLNAvI_754_722.png" alt="Alt text"></p>
<ul>
<li><p><code>Source</code>: 选中 <code>master branch</code>后点击 <code>Save</code></p>
</li>
<li><p><code>Custom domain</code>中默认为空白, 即不与域名绑定, 也不会影响网站的访问; 填入一个已经注册的域名, 点击<code>Save</code>后, 则填入的域名与正在建立的这个博客网站已经绑定, 理论上现在在浏览器的地址栏中输入域名就可以访问网站了, 而不需要去访问仓库名了. 但是实际上到这一步我还不能通过访问绑定的域名来访问我的网站, 具体的原因和解决办法我在最后说明</p>
<p>　如果你点击<code>Choose a theme</code>按钮，则选中一个主题后<code>Select theme</code>, 如果不想选择主题, 则直接进行__第5步”预览”__即可<br><img src="/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaAsSHzNAz3NBWY_1382_829.png" alt="Alt text">  </p>
</li>
</ul>
<h3 id="5-预览"><a href="#5-预览" class="headerlink" title="5. 预览"></a>5. 预览</h3><p>在继续教程前，可以先预览一下页面，但实际你最后做出的效果会和这个比起来好几百倍，但你可以先确认一下能不能显示出页面来, 在浏览器地址栏输入仓库名, 点击回车即可, 比如在浏览器地址栏输入<code>WakoJia-Pei.github.io</code><br><img src="/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaAw3K1MzQV3_1399_76.png" alt="Alt text"></p>
<h3 id="6-将仓库克隆到本地"><a href="#6-将仓库克隆到本地" class="headerlink" title="6. 将仓库克隆到本地"></a>6. 将仓库克隆到本地</h3><p>用git命令或者客户端都行, 达到目的就行, 我是以git为例</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git clone https:&#x2F;&#x2F;github.com&#x2F;WakoJia-Pei&#x2F;WakoJia-Pei.github.io.git</span><br></pre></td></tr></table></figure>

<h3 id="7-选择主题模板"><a href="#7-选择主题模板" class="headerlink" title="7. 选择主题模板"></a>7. 选择主题模板</h3><p>这时候，你就该真正考虑一下你的博客主题风格了，如果你前端开发的功底不好，就不建议频繁更换主题了，虽然要改也不是不行，只是要折腾就是了</p>
<p>到这个网站选择你喜欢的模板<a target="_blank" rel="noopener" href="http://jekyllthemes.org/">http://jekyllthemes.org/</a><br><img src="/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaA_WIDNAtnNBWI_1378_729.png" alt="Alt text"></p>
<p>选择自己喜欢的模板, 点击“<strong>download</strong>”，把它下载下来吧</p>
<h3 id="8-应用主题"><a href="#8-应用主题" class="headerlink" title="8. 应用主题"></a>8. 应用主题</h3><p>打开存放克隆下来仓库的文件夹，把里面的文件<code>全部都删了（没错），除了隐藏文件夹“.git”不要删</code>就好了，然后把模板里的东西全部拖到你的原博客仓库里<br>    　　 比如：存放克隆下来仓库的文件夹（/home/root/sit/WakoJia-Pei.github.io/ ）, 将下载的主题压缩包里的文件全部拖拽到存放仓库的文件里面<br><img src="/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaBBpXXNAvPNBpQ_1684_755.png" alt="Alt text"></p>
<h3 id="9-配置博客基本信息"><a href="#9-配置博客基本信息" class="headerlink" title="9. 配置博客基本信息"></a>9. 配置博客基本信息</h3><p>先简单介绍一下这个仓库里的内容，你根据自身需要用文本编辑器来修改内容<br><img src="/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaBGAuXNAaXNBOU_1253_421.png" alt="Alt text"></p>
<ul>
<li><p>index.html：这是博客的主页面，里面的内容就是博客主页了</p>
</li>
<li><p>_config.yml：这是博客的基本配置文件，里面有博客的名字，以及存放博主的一些基本信息</p>
</li>
<li><p>_layouts：这文件夹里面存放你每个页面的设计，一般有default.html（默认页面）和posts.html（博文页面）</p>
</li>
<li><p>_includes：这个文件夹里的的内容将会通用到你博客每个页面，起到一种便利的作用</p>
</li>
<li><p>_posts：这里面装的就是博文文件啦，__记住，要用markdown语法写，而且命名格式必须严格按照 “<em>2018-12-12-MySQL-默认字符集修改.md</em>“ 的格式, __要不然上传会失败的</p>
</li>
</ul>
<p>以上就是一个Jekyll规范的博客的基本内容了，想想也不是很难吧^_^</p>
<h3 id="10-上传到github线上仓库"><a href="#10-上传到github线上仓库" class="headerlink" title="10. 上传到github线上仓库"></a>10. 上传到github线上仓库</h3><p>现在已经把博客基本配置完成了，那么就该把它上传到github公布吧</p>
<p>进入到存放克隆下来仓库的文件夹（/home/root/sit/WakoJia-Pei.github.io/ ）, 执行三条命令</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git add .</span><br><span class="line">git commit -m &#39;更换网站主题 &#39;</span><br><span class="line">git push</span><br></pre></td></tr></table></figure>

<h3 id="11-后记"><a href="#11-后记" class="headerlink" title="11. 后记"></a>11. 后记</h3><h4 id="如果不绑定域名的话-进行到这一步-那么网站的搭建步骤就全部完成了-之后可以在-posts-文件夹里继续撰写博文，然后按照-第10步-上传到github线上仓库-即可"><a href="#如果不绑定域名的话-进行到这一步-那么网站的搭建步骤就全部完成了-之后可以在-posts-文件夹里继续撰写博文，然后按照-第10步-上传到github线上仓库-即可" class="headerlink" title="如果不绑定域名的话,进行到这一步, 那么网站的搭建步骤就全部完成了,之后可以在_posts 文件夹里继续撰写博文，然后按照__第10步 上传到github线上仓库__即可"></a>如果不绑定域名的话,进行到这一步, 那么网站的搭建步骤就全部完成了,之后可以在_posts 文件夹里继续撰写博文，然后按照__第10步 上传到github线上仓库__即可</h4><p>稍等一会儿，打开网站,按照<strong>第5步操作</strong>,就会发现博客文章已经神奇的出现了^_^</p>
<h3 id="12-绑定域名"><a href="#12-绑定域名" class="headerlink" title="12. 绑定域名"></a>12. 绑定域名</h3><p>在__<code>第4步 的Custom domain</code>__中提到已经绑定域名了, 还是不能通过访问域名的方式来访问网站, 这是什么原因呢? 原因很简单, 就是域名的DNS与GitHub pages并没有关联, 我要做的就是将域名的DNS映射到GitHub pages上, 那么首先到自己域名注册机构的官网上, 我是在<a target="_blank" rel="noopener" href="https://sg.godaddy.com/zh/">Godaddy</a>上申请注册的域名,进入到<a target="_blank" rel="noopener" href="https://dcc.godaddy.com/manage/">域名管理器</a>页面<br><img src="/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaByXSrNA2rNBYw_1420_874.png" alt="Alt text"></p>
<p>选择<code>管理DNS</code>后, 进入<br><img src="/2018/12/12/2018-12-12-%E5%88%A9%E7%94%A8GitHub%E7%9A%84Pages%E5%BB%BA%E7%AB%8B%E8%87%AA%E5%B7%B1%E4%B8%93%E5%B1%9E%E5%8D%9A%E5%AE%A2%E7%9A%84%E8%AF%A6%E7%BB%86%E6%AD%A5%E9%AA%A4/lALPDgQ9qaB0NQvNA3TNBXw_1404_884.png" alt="Alt text"></p>
<p>在记录中主要修改类型为A的两行记录, 将值分别修改为<code>192.30.252.153</code> 和 <code>192.30.2525.154</code></p>
<table>
<thead>
<tr>
<th align="center">类型</th>
<th align="center">名称</th>
<th align="center">值</th>
</tr>
</thead>
<tbody><tr>
<td align="center">A</td>
<td align="center">@</td>
<td align="center">192.30.252.153</td>
</tr>
<tr>
<td align="center">A</td>
<td align="center">@</td>
<td align="center">192.30.252.154</td>
</tr>
</tbody></table>
<p><strong>原本默认的类型A的记录只有一条, 需要手动添加一条A记录, 另外<code>其他的选项最好不要改动</code></strong></p>
<h4 id="进行到这一步-基本上所有的步骤就全部完成了-现在就可以通过域名访问网站了"><a href="#进行到这一步-基本上所有的步骤就全部完成了-现在就可以通过域名访问网站了" class="headerlink" title="进行到这一步, 基本上所有的步骤就全部完成了, 现在就可以通过域名访问网站了"></a>进行到这一步, 基本上所有的步骤就全部完成了, 现在就可以通过域名访问网站了</h4><hr>
<blockquote>
<p><a target="_blank" rel="noopener" href="http://cyzus.github.io/2015/06/21/github-build-blog/">参考原文</a>:    <a target="_blank" rel="noopener" href="http://cyzus.github.io/2015/06/21/github-build-blog/">http://cyzus.github.io/2015/06/21/github-build-blog/</a><br><code>主要是GitHub相较于原文的版本, 页面排版不一样了, 我在参考原文的时候折腾了半天, 所以才将自己的操作步骤记录下来, 仅供参考</code></p>
</blockquote>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/site/" rel="tag"># site</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2018/12/10/2018-12-10-MySQL-%E4%BF%AE%E6%94%B9%E5%AD%97%E7%AC%A6%E9%9B%86/" rel="prev" title="CentOS7下MySQL修改字符集">
      <i class="fa fa-chevron-left"></i> CentOS7下MySQL修改字符集
    </a></div>
      <div class="post-nav-item">
    <a href="/2018/12/13/2018-12-13-MySQL-%E7%94%A8%E6%88%B7%E5%88%9B%E5%BB%BA%E4%BB%A5%E5%8F%8A%E6%8E%88%E6%9D%83%E5%B9%B6%E8%A7%A3%E5%86%B3%E6%96%B0%E5%BB%BA%E7%94%A8%E6%88%B7%E6%97%A0%E6%B3%95%E7%99%BB%E5%BD%95%E9%97%AE%E9%A2%98/" rel="next" title="MySQL 创建用户、授权并解决新建用户无法登录问题">
      MySQL 创建用户、授权并解决新建用户无法登录问题 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-%E7%99%BB%E5%BD%95GitHub%E5%AE%98%E7%BD%91"><span class="nav-number">1.</span> <span class="nav-text">1. 登录GitHub官网</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-%E5%88%9B%E5%BB%BA%E4%BB%93%E5%BA%93"><span class="nav-number">2.</span> <span class="nav-text">2. 创建仓库</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-%E8%BF%9B%E5%85%A5GitHub%E7%BA%BF%E4%B8%8A%E4%BB%93%E5%BA%93%E8%AE%BE%E7%BD%AE"><span class="nav-number">3.</span> <span class="nav-text">3. 进入GitHub线上仓库设置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-%E8%87%AA%E5%8A%A8%E7%94%9F%E6%88%90%E5%8D%9A%E5%AE%A2"><span class="nav-number">4.</span> <span class="nav-text">4. 自动生成博客</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#5-%E9%A2%84%E8%A7%88"><span class="nav-number">5.</span> <span class="nav-text">5. 预览</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#6-%E5%B0%86%E4%BB%93%E5%BA%93%E5%85%8B%E9%9A%86%E5%88%B0%E6%9C%AC%E5%9C%B0"><span class="nav-number">6.</span> <span class="nav-text">6. 将仓库克隆到本地</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#7-%E9%80%89%E6%8B%A9%E4%B8%BB%E9%A2%98%E6%A8%A1%E6%9D%BF"><span class="nav-number">7.</span> <span class="nav-text">7. 选择主题模板</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#8-%E5%BA%94%E7%94%A8%E4%B8%BB%E9%A2%98"><span class="nav-number">8.</span> <span class="nav-text">8. 应用主题</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#9-%E9%85%8D%E7%BD%AE%E5%8D%9A%E5%AE%A2%E5%9F%BA%E6%9C%AC%E4%BF%A1%E6%81%AF"><span class="nav-number">9.</span> <span class="nav-text">9. 配置博客基本信息</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#10-%E4%B8%8A%E4%BC%A0%E5%88%B0github%E7%BA%BF%E4%B8%8A%E4%BB%93%E5%BA%93"><span class="nav-number">10.</span> <span class="nav-text">10. 上传到github线上仓库</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#11-%E5%90%8E%E8%AE%B0"><span class="nav-number">11.</span> <span class="nav-text">11. 后记</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E5%A6%82%E6%9E%9C%E4%B8%8D%E7%BB%91%E5%AE%9A%E5%9F%9F%E5%90%8D%E7%9A%84%E8%AF%9D-%E8%BF%9B%E8%A1%8C%E5%88%B0%E8%BF%99%E4%B8%80%E6%AD%A5-%E9%82%A3%E4%B9%88%E7%BD%91%E7%AB%99%E7%9A%84%E6%90%AD%E5%BB%BA%E6%AD%A5%E9%AA%A4%E5%B0%B1%E5%85%A8%E9%83%A8%E5%AE%8C%E6%88%90%E4%BA%86-%E4%B9%8B%E5%90%8E%E5%8F%AF%E4%BB%A5%E5%9C%A8-posts-%E6%96%87%E4%BB%B6%E5%A4%B9%E9%87%8C%E7%BB%A7%E7%BB%AD%E6%92%B0%E5%86%99%E5%8D%9A%E6%96%87%EF%BC%8C%E7%84%B6%E5%90%8E%E6%8C%89%E7%85%A7-%E7%AC%AC10%E6%AD%A5-%E4%B8%8A%E4%BC%A0%E5%88%B0github%E7%BA%BF%E4%B8%8A%E4%BB%93%E5%BA%93-%E5%8D%B3%E5%8F%AF"><span class="nav-number">11.1.</span> <span class="nav-text">如果不绑定域名的话,进行到这一步, 那么网站的搭建步骤就全部完成了,之后可以在_posts 文件夹里继续撰写博文，然后按照__第10步 上传到github线上仓库__即可</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#12-%E7%BB%91%E5%AE%9A%E5%9F%9F%E5%90%8D"><span class="nav-number">12.</span> <span class="nav-text">12. 绑定域名</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E8%BF%9B%E8%A1%8C%E5%88%B0%E8%BF%99%E4%B8%80%E6%AD%A5-%E5%9F%BA%E6%9C%AC%E4%B8%8A%E6%89%80%E6%9C%89%E7%9A%84%E6%AD%A5%E9%AA%A4%E5%B0%B1%E5%85%A8%E9%83%A8%E5%AE%8C%E6%88%90%E4%BA%86-%E7%8E%B0%E5%9C%A8%E5%B0%B1%E5%8F%AF%E4%BB%A5%E9%80%9A%E8%BF%87%E5%9F%9F%E5%90%8D%E8%AE%BF%E9%97%AE%E7%BD%91%E7%AB%99%E4%BA%86"><span class="nav-number">12.1.</span> <span class="nav-text">进行到这一步, 基本上所有的步骤就全部完成了, 现在就可以通过域名访问网站了</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Want.Jocker"
      src="/images/avatar.gif">
  <p class="site-author-name" itemprop="name">Want.Jocker</p>
  <div class="site-description" itemprop="description">不积跬步无以至千里</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">25</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">2</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">21</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Want.Jocker</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://mist.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Mist</a> 强力驱动
  </div>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  

</body>
</html>
